package com.deductive.domain.special;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.deductive.common.config.mybatis.GeoJsonToGeometryDeserializer;
import com.deductive.common.config.mybatis.GeometryToGeoJsonSerializer;
import com.deductive.common.config.mybatis.GeometryTypeHandler;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

import java.io.Serializable;

/**
 * 机场
 * @TableName special_airport
 */
@ApiModel(value = "SpecialAirport", description = "机场信息")
@TableName(value ="special_airport")
@Data
public class SpecialAirport implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 空间几何数据
     */
    @ApiModelProperty(value = "空间几何数据")
    @TableField(value = "geom", typeHandler = GeometryTypeHandler.class)
    @JsonSerialize(using = GeometryToGeoJsonSerializer.class)
    @JsonDeserialize(using = GeoJsonToGeometryDeserializer.class)
    private Geometry geom;

    /**
     * 国家名称
     */
    @ApiModelProperty(value = "国家名称")
    @TableField(value = "country_name")
    private String countryName;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @TableField(value = "name")
    private String name;

    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    @TableField(value = "english_name")
    private String englishName;

    /**
     * 类型
     */
    @ApiModelProperty(value = "类型")
    @TableField(value = "type")
    private String type;

    /**
     * 地址区域
     */
    @ApiModelProperty(value = "地址区域")
    @TableField(value = "address")
    private String address;

    /**
     * 简介
     */
    @ApiModelProperty(value = "简介")
    @TableField(value = "overview")
    private String overview;

    /**
     * 跑道长度
     */
    @ApiModelProperty(value = "跑道长度")
    @TableField(value = "runway_length")
    private String runwayLength;

    /**
     * 跑道宽度
     */
    @ApiModelProperty(value = "跑道宽度")
    @TableField(value = "runway_width")
    private String runwayWidth;

    /**
     * icao代码
     */
    @ApiModelProperty(value = "ICAO代码")
    @TableField(value = "icao_code")
    private String icaoCode;

    /**
     * iata代码
     */
    @ApiModelProperty(value = "IATA代码")
    @TableField(value = "iata_code")
    private String iataCode;

    /**
     * 飞行区等级
     */
    @ApiModelProperty(value = "飞行区等级")
    @TableField(value = "grade")
    private String grade;

    /**
     * 航站楼面积
     */
    @ApiModelProperty(value = "航站楼面积")
    @TableField(value = "area")
    private String area;

    /**
     * 省名称
     */
    @ApiModelProperty(value = "省名称")
    @TableField(value = "provide_name")
    private String provideName;

    /**
     * 可起降机型
     */
    @ApiModelProperty(value = "可起降机型")
    @TableField(value = "model")
    private String model;

    /**
     * 来源
     */
    @ApiModelProperty(value = "来源")
    @TableField(value = "source")
    private String source;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    @TableField(value = "lon")
    private Double lon;



    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    @TableField(value = "lat")
    private Double lat;

    /**
     * 父Id
     */
    @ApiModelProperty(value = "父Id")
    @TableField(value = "parent_id")
    private Integer parentId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}